package com.mvp.lt.airlineview.start;
import com.mvp.lt.airlineview.base.BaseActivity;
import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;

import com.mvp.lt.airlineview.R;
import com.mvp.lt.airlineview.utils.LogUtil;
import com.mvp.lt.airlineview.utils.SPManager;


/**
 * $activityName
 *
 * @author LiuTao
 * @date 2019/3/6/006
 */
public class SplashActivity extends BaseActivity {
    private String TAG = SplashActivity.class.getSimpleName();
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_spalsh);
        boolean isFirstUse = SPManager.getBoolean(SPManager.SP_SPALSH_FLAG, "isFirstUse", true);
        if (isFirstUse) {
            startActivity(new Intent(this, GuideActivity.class));
        } else {
            startActivity(new Intent(this, WelcomeActivity.class));
        }
        SPManager.saveBoolean(SPManager.SP_SPALSH_FLAG, "isFirstUse", false);
        finish();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        LogUtil.e(TAG, "------onDestroy------");
    }
}
